<script src="https://cdn.jsdelivr.net/vue.resource/1.0.2/vue-resource.min.js"></script>
<script src='https://unpkg.com/vue@2.1.10/dist/vue.js'></script>
<script>Vue.use(VueResource)</script>
<div id="app">
        <button @click="send">发送</button>
</div>

<script>
    var vm=new Vue({
        el:'#app',
        data:{
            postData:{
                name:'zjh',
                age:18,
                sex:'man'
            }
        },
        methods:{
            send:function(){
                var url="http://localhost/test.php";
                this.$http.post(url,this.postData,{emulateJSON:true}).then(
                    function(res){
                        console.log('成功');
                        console.log(res);
                    },
                    function(res){
                        console.log('失败');
                        console.log(res);
                    }
                );
            }
        }
    });
</script>